package yhao.demo.web.firstWeb.remote;


import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import org.springframework.stereotype.Service;
import yhao.demo.service.login.apilist.model.LoginPersonModel;
import yhao.demo.service.login.apilist.restful.LoginFeign;
import yhao.infra.apilist.validate.LoginForm;

import javax.annotation.Resource;


/**
 * Created by yoara on 2019/1/16.
 */
@Service
public class LoginRemote {
    @Resource
    private LoginFeign loginFeign;

    @HystrixCommand
    public LoginPersonModel authenticatePerson(LoginForm loginForm) {
        return loginFeign.authenticatePerson(loginForm).pickBody();
    }
}
